<?php
class Orthographe_WordCounter_Block_Adminhtml_Renderer_TimeLeft extends Mage_Adminhtml_Block_Widget_Grid_Column_Renderer_Abstract
{
	public function render(Varien_Object $row)
	{
		$data = "";
		$strDateCorrecteur = $row->getData($this->getColumn()->getIndex());
		if(!empty($strDateCorrecteur)) {
			$dateLimiteCorrecteur = strtotime($row->getData($this->getColumn()->getIndex()));
			$dateNow = strtotime("now");

			$nb_heur = round(($dateLimiteCorrecteur-$dateNow)/(60*60));

			$data =$row->getData($this->getColumn()->getIndex())."<br>".$nb_heur."h";
		}
		return $data;
	}
}